package com.dy.dept.service.impl;

import com.dy.dept.entity.Dept;
import com.dy.dept.entity.Deptinfo;
import com.dy.dept.mapper.DeptinfoMapper;
import com.dy.dept.service.IDeptinfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dy
 * @since 2022-03-22
 */
@Service
public class DeptinfoServiceImpl extends ServiceImpl<DeptinfoMapper, Deptinfo> implements IDeptinfoService {
    @Autowired
    private DeptinfoMapper deptinfoMapper;

    @Override
    @Transactional
    public boolean insertDeptInfoByDept(Dept dept) {
        return deptinfoMapper.insertDeptInfoByDept(dept) > 0 ? true : false;
    }
}
